//
//  TTMessagesDataSource.m
//  UADE-Mobile
//
//  Created by Marcos Damian Pianelli on 11/14/11.
//  Copyright (c) 2011 DG. All rights reserved.
//

#import "TTMessagesDataSource.h"
#import "TTTableCustomMessageItemCell.h"

@implementation TTMessagesDataSource



- (UIImage*)imageForEmpty {
    return TTIMAGE(@"bundle://Three20.bundle/images/empty.png");
}

- (NSString*)titleForEmpty {
    return NSLocalizedString(@"No Messages", @"");
}

- (NSString*)subtitleForEmpty {
    return NSLocalizedString(@"Don't worry there will be messages soon.", @"");
}

- (UIImage*)imageForError:(NSError*)error {
    return TTIMAGE(@"bundle://Three20.bundle/images/error.png");
}

- (NSString*)subtitleForError:(NSError*)error {
    return NSLocalizedString(@"There was an error loading your messages.", @"");
}



- (Class)tableView:(UITableView*)tableView cellClassForObject:(id)object {
    
    if ([object isKindOfClass:[TTTableMessageItem  class]]) {
        return [TTTableCustomMessageItemCell class];
    }
    
    return [super tableView:tableView cellClassForObject:object];
    
    
}




@end
